import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_attachment",{schema:"fastadmin" } )
export class fa_attachment {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"admin_id"
        })
    admin_id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"user_id"
        })
    user_id:number;
        

    @Column("varchar",{ 
        nullable:false,
        name:"url"
        })
    url:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"imagewidth"
        })
    imagewidth:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"imageheight"
        })
    imageheight:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"imagetype"
        })
    imagetype:string;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"imageframes"
        })
    imageframes:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"filesize"
        })
    filesize:number;
        

    @Column("varchar",{ 
        nullable:false,
        length:100,
        name:"mimetype"
        })
    mimetype:string;
        

    @Column("varchar",{ 
        nullable:false,
        name:"extparam"
        })
    extparam:string;
        

    @Column("int",{ 
        nullable:true,
        name:"createtime"
        })
    createtime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"updatetime"
        })
    updatetime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"uploadtime"
        })
    uploadtime:number | null;
        

    @Column("varchar",{ 
        nullable:false,
        length:100,
        default: () => "'local'",
        name:"storage"
        })
    storage:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:40,
        name:"sha1"
        })
    sha1:string;
        
}
